import axios from "axios"
//
let login = (data) => axios.post('/admin/login', data);
//
let register = (data) => axios.post('/admin/register', data);
//
let check_username = (data) => axios.post('/admin/check/username', data);
//
let list = (params) => axios.get('/admin/list', { params });
//
let role = (params) => axios.get('/role/list', { params })
//
let remove = (data) => axios.post('/admin/remove', data);
//登录
// login(data){
//     return axios.post('/admin/login',data)
// } 
let change = (params) => axios.post('/admin/info', params);
let info = (params) => axios.get('/admin/info', { params });
let removeRole = (id) => axios.delete(`/role/${id}`, { id });
let update = (id, data) => axios.put(`/role/${id}`, data);
let addRole = (data) => axios.post('/role', data);
let menu = (params) => axios.get('/role/menu/', { params })
export default {
    login,
    register, check_username, list, role, remove, info, change, removeRole, update, addRole, menu,
}